package com.basksoft.baskreport.demo.config;

import javax.servlet.http.HttpServletRequest;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

@Configuration
public class ReportMultipartResolver extends CommonsMultipartResolver{

    @Override
    public boolean isMultipart(HttpServletRequest request) {
        //如果是baskreport请求则不执行spring默认的MultipartHttpServletRequest转换
        if (request.getRequestURI().contains("/baskreport")) {
            return false;
        }
        
        return super.isMultipart(request);
    }

}
